<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="IngresosEditDlg" widgetVar="IngresosEditDialog" modal="true" resizable="false" appendToBody="true" header="#{rentaBundle.EditIngresosTitle}">

            <h:form id="IngresosEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{ingresosController.selected != null}">

                        <h:outputLabel value="#{rentaBundle.EditIngresosLabel_idingresos}" for="idingresos" />
                        <h:outputText id="idingresos" value="#{ingresosController.selected.idingresos}" />

                        <p:outputLabel value="#{rentaBundle.EditIngresosLabel_fechaingresos}" for="fechaingresos" />
                        <p:calendar id="fechaingresos" pattern="MM/dd/yyyy HH:mm:ss" value="#{ingresosController.selected.fechaingresos}" title="#{rentaBundle.EditIngresosTitle_fechaingresos}"  showOn="button"/>

                        <p:outputLabel value="#{rentaBundle.EditIngresosLabel_montoingresos}" for="montoingresos" />
                        <p:inputText id="montoingresos" value="#{ingresosController.selected.montoingresos}" title="#{rentaBundle.EditIngresosTitle_montoingresos}" />

                        <p:outputLabel value="#{rentaBundle.EditIngresosLabel_tipoingresosIdtipoingresos}" for="tipoingresosIdtipoingresos" />
                        <p:selectOneMenu id="tipoingresosIdtipoingresos" value="#{ingresosController.selected.tipoingresosIdtipoingresos}" required="true" requiredMessage="#{rentaBundle.EditIngresosRequiredMessage_tipoingresosIdtipoingresos}" converter="tipoingresosConverter">
                            <f:selectItem itemLabel="#{rentaBundle.SelectOneMessage}"/>
                            <f:selectItems value="#{tipoingresosController.items}"
                                           var="tipoingresosIdtipoingresosItem"
                                           itemValue="#{tipoingresosIdtipoingresosItem}"
                                           itemLabel="#{tipoingresosIdtipoingresosItem.nombretipoingresos.toString()}"
                                           />

                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{ingresosController.save}" value="#{rentaBundle.Save}" update="display,:IngresosListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,IngresosEditDialog);"/>
                    <p:commandButton value="#{rentaBundle.Cancel}" onclick="IngresosEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
